#ifndef _VEHICLE_STATUS_
#define _VEHICLE_STATUS_

#include <stdint.h>

typedef enum {
	MODE_STABLIZED = 0,
	MODE_ALT_HOLD,
	MODE_LOITER
} fc_mode_t;

typedef enum {
	DISARMED = 0,
	ARMED_IDLE,
	ARMED_ACTIVATED,
	IN_IMU_CALIBRATION,
	IN_MAG_CALIBRATION
} arm_status_t;

struct vehicle_status {
	fc_mode_t flight_mode;
	arm_status_t arm_status;

	uint16_t mag_calibrated	:	1;
	uint16_t landed	:		1;

	uint64_t last_update_time;
	uint64_t try_arming_disarming_start_time;
	int16_t mode_switch_position;
	uint8_t mode_switch_counter;
};

#endif
